#include "stdafx.h"
#include "resource.h"
#include "Application.h"
#include "Timer.h"
#include <string>

using namespace Hawthorn;

Application::Application(HINSTANCE inst)
	: _instance(inst)
{
	_accelTable = LoadAccelerators(_instance, MAKEINTRESOURCE(IDR_ACCELERATOR1));
	_window = new Window(std::string("Game"));

	_server = new TCPServer()
}

Application::~Application()
{
}

int Application::run()
{
	MSG msg;
	while (GetMessageW(&msg, NULL, 0, 0))
	{
		// handle and dispatch messages
		if (!TranslateAccelerator(msg.hwnd, _accelTable, &msg))
		{
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
	}

	return (int)msg.wParam;
}

void Application::setAnimationInterval(float interval)
{
	_animationInterval = interval;
};